package com.sqx.modules.health.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 聊天记录表
 * </p>
 *
 * @author gxy
 * @since 2022-09-07
 */
@Getter
@Setter
  @TableName("ncg_app_messages")
@ApiModel(value = "AppMessages对象", description = "聊天记录表")
public class AppMessages implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("记录id")
        @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      @ApiModelProperty("发送方uid")
      private Long senduid;

      @ApiModelProperty("接收方uid: 群聊就是群id")
      private Long acceptuid;

      @ApiModelProperty("类型： 1-文字;  2-图片; 3-文件")
      private Integer msgtype;

      @ApiModelProperty("聊天内容:【发送方uid】：talk内容")
      private String content;

      @ApiModelProperty("文件路径。多个文件分号间隔")
      private String filepath;

//      @ApiModelProperty("创建时间")
//      private LocalDateTime createtime;

      @ApiModelProperty("创建时间")
      @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")                    // 表示返回时间类型
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")      // 表示接收时间类型
      private LocalDateTime createtime;

      @ApiModelProperty("是否自己发出方")
      private String isme;

      @ApiModelProperty("状态：1-正常;2-删除")
      private Integer status;

      @ApiModelProperty("删除|R[0-未删除;1-被删除]")
      private Integer isdelete;
//
//      @ApiModelProperty("创建时间")
//      private LocalDateTime createTime;
//
//      @ApiModelProperty("更新时间")
//      private LocalDateTime updateTime;


}
